<template>
  <div class="">
    <button @click="show = !show">Toggle</button>
    <Transition name="bounce">
      <p v-if="show" style="text-align: center;">
        Hello here is some bouncy text!
      </p>
    </Transition>

    <!-- animate.css -->
    <Transition name="custom-classes" enter-active-class="animate__animated animate__tada"
      leave-active-class="animate__animated animate__bounceOutRight">
      <p v-if="show">hello</p>
    </Transition>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const show = ref(false)
</script>

<style lang="less" scoped>
.bounce-enter-active {
  animation: bounce-in 0.5s;
}

.bounce-leave-active {
  animation: bounce-in 0.5s reverse;
}

@keyframes bounce-in {
  0% {
    transform: scale(0);
  }

  50% {
    transform: scale(1.25);
  }

  100% {
    transform: scale(1);
  }
}
</style>
